package com.jeespring.rocketmq;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @description Consumer
 * @author 张朝阳
 * @date 2021/9/20 1:09:09
 */
@Component
@RocketMQMessageListener(topic = "topic1", consumerGroup = "consumer-group")
public class Consumer implements RocketMQListener<String> {

    @Override
    public void onMessage(String s) {
        System.out.println(s);
    }
}
